<script type="text/html" template lay-done="layui.data.sendParams(d);">
    <div class="layui-form coreshop-form layui-form-pane" lay-filter="LAY-app-corecmsdriver-editForm" id="LAY-app-corecmsdriver-editForm">
        <input type="hidden" name="id" value="{{d.params.data.model.id || '' }}" />
        <!--<div class="layui-form-item">
        <label for="id" class="layui-form-label  layui-form-required">主键</label>
        <div class="layui-input-block">
            <input  type="number" min="0" max="999999" name="id"   lay-verType="tips" lay-verify="required|number" class="layui-input" value="{{d.params.data.model.id || '' }}" placeholder="请输入主键" lay-reqText="请输入主键并为数字"  />
        </div>
    </div>-->

        <div class="layui-form-item">
            <label for="name" class="layui-form-label  layui-form-required">名字</label>
            <div class="layui-input-block">
                <input name="name" lay-verType="tips" lay-verify="required" class="layui-input" placeholder="请输入名字" lay-reqText="请输入名字" value="{{d.params.data.model.name || '' }}" />
            </div>
        </div>

        <div class="layui-form-item">
            <label for="mobile" class="layui-form-label  layui-form-required">手机号</label>
            <div class="layui-input-block">
                <input name="mobile" lay-verType="tips" lay-verify="required" class="layui-input" placeholder="请输入手机号" lay-reqText="请输入手机号" value="{{d.params.data.model.mobile || '' }}" />
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">用户：</label>
            <div class="layui-input-inline">
                <div class="layui-input-prefix">
                    <i class="layui-icon layui-icon-username"></i>
                </div>
                <select name="userId">
                    <option value="" selected="selected">请选择</option>
                    {{# layui.each(d.params.data.users, function(index, item){ }}
                    <option value="{{ item.id }}" {{item.id===d.params.data.model.userId?'selected="selected"':''}}>{{ item.userName }}</option>
                    {{# }); }}
                </select>
            </div>
        </div>

        <div class="layui-form-item" pane>
            <label for="active" class="layui-form-label  layui-form-required">是否激活</label>
            <div class="layui-input-block">
                <input type="checkbox" lay-filter="switch" name="active" {{ d.params.data.model.active ? 'checked' : '' }} lay-skin="switch" lay-text="开启|关闭">
            </div>
        </div>

        <div hidden class="layui-form-item">
            <label for="createTime" class="layui-form-label  layui-form-required">注册时间</label>
            <div class="layui-input-block">
                <input name="createTime"  id="editTime-corecmsdriver-createTime" type="text" lay-verType="tips" lay-verify="required|datetime" class="layui-input" placeholder="请输入注册时间" lay-reqText="请输入注册时间"   value="{{d.params.data.model.createTime || '' }}"/>
            </div>
        </div>

    <!--<div class="layui-form-item">
        <label for="updateTime" class="layui-form-label  layui-form-required">修改时间</label>
        <div class="layui-input-block">
            <input name="updateTime"  id="editTime-corecmsdriver-updateTime" type="text" lay-verType="tips" lay-verify="required|datetime" class="layui-input" placeholder="请输入修改时间" lay-reqText="请输入修改时间"   value="{{d.params.data.updateTime || '' }}"/>
        </div>
    </div>-->

        <div class="layui-form-item text-right core-hidden">
            <input type="button" class="layui-btn" lay-submit lay-filter="LAY-app-corecmsdriver-editForm-submit" id="LAY-app-corecmsdriver-editForm-submit" value="确认编辑">
        </div>
    </div>
</script>
<script>
    var debug= layui.setter.debug;
    layui.data.sendParams = function (d) {
        //开启调试情况下获取接口赋值数据
        if (debug) { console.log(d.params.data); }
        layui.use(['admin', 'form', 'laydate', 'upload', 'coreHelper', 'cropperImg'],
        function () {
            var $ = layui.$
                , form = layui.form
                , admin = layui.admin
                , laydate = layui.laydate
                , upload = layui.upload
                , cropperImg = layui.cropperImg
                , coreHelper = layui.coreHelper;
        
            laydate.render({
                elem: '#editTime-corecmsdriver-createTime',
                type: 'datetime'
            });
            laydate.render({
                elem: '#editTime-corecmsdriver-updateTime',
                type: 'datetime'
            });
            form.verify({
                
            });
            //重载form
            form.render(null, 'LAY-app-corecmsdriver-editForm');
        })
    };
</script>
